Skip to main content

Changing parents

Just an example how you would move an object under a different transform.

Example

self.ourObject.tranform.parent = self.newParent.transform;

User Variables

Componentvariable
GameObjectself.ourObject
GameObjectself.newParent

FAQ

Can I detach from the parent?

Just change the value to nil.

self.ourObject.tranform.parent = nil;